powered by
This method can be used to retrieve a variable or a dimension from the dataset by name.
# S4 method for ncdfDataset [[(x, i)
An instance of ncdfVariable or an ncdfDimension descendant class, or NULL if the name is not found.
ncdfVariable
ncdfDimension
NULL
An ncdfDataset to extract a variable or a dimension from.
ncdfDataset
The name of a variable or dimension in x.
x
fn <- system.file("extdata", "ERA5land_Rwanda_20160101.nc", package = "ncdfCF") ds <- open_ncdf(fn) v1 <- names(ds)[1] var <- ds[[v1]] var
Run the code above in your browser using DataLab